﻿using System.Runtime.Serialization;

namespace RockBus.DataContracts
{
    [DataContract(Namespace = StringConstants.RockBusNamespace)]
    public enum ExchangeTypeEnum : int
    {
        /// <summary>
        /// Specifies OneWay communication and the use of a oneway transport. No acknowledgement, no response.
        /// </summary>
        [EnumMember]
        OneWay = 0,

        /// <summary>
        /// Specifies OneWay communication and the use of a oneway transport.
        ///  For an ReceivePortInfo ReplyEndpoint, this means the response will be sent over a OneWay Endpoint.
        ///  For a SubscriptionInfo DestinationEndpoint, this means the request will be sent to the subscriber over a OneWay endpoint. The Subscriber is expected to produce a response and send it back via OneWay or TwoWayAck.
        /// </summary>
        [EnumMember]
        OneWayRequestResponse = 1,

        /// <summary>
        /// Specifies TwoWay communication, with the response being an acknowledgement.
        ///  The acknowledgement is used to signal successful receipt of the message.
        /// </summary>
        [EnumMember]
        TwoWayAck = 2,

        /// <summary>
        /// Specifies TwoWay communication and the use of a oneway transport.
        ///  For an ReceivePortInfo ReplyEndpoint, this means the response will be sent over a TwoWayAck Endpoint.
        ///  For a SubscriptionInfo DestinationEndpoint, this means the request will be sent to the subscriber over a TwoWayAck endpoint. The Subscriber is expected to produce a response and send it back via OneWay or TwoWayAck.
        /// </summary>
        [EnumMember]
        TwoWayAckRequestResponse = 3,

        /// <summary>
        /// Specifies TwoWay communication, with the response being generated by the receiver.
        ///  The receiver is expected to produce a response. The sender expects to receive the response as a return message to the request.
        /// </summary>
        [EnumMember]
        TwoWayRequestResponse = 4,
    }
}